def init_db():
    """初始化数据库表"""
    from backend.models.user import User
    from backend.models.process import Process
    from backend.models.setting import Setting
    from backend.models.execution import Execution
    from backend.models.shop import Shop
    from backend.models.item import Item

    # 创建表
    User.create_table()
    Process.create_table()
    Setting.create_table()
    Execution.create_table()
    Shop.create_table()
    Item.create_table()
    
    # 初始化默认数据
    init_default_data() 